package com.qudian.pay.core.runtime;

import java.util.Date;
import java.util.UUID;
import com.qudian.pay.core.model.BaseModel;

/**
 * @Description: 产品上下文
 * @ClassName: ProductContext
 * @author gaoxiang
 * @date 2016年5月24日 下午4:20:32
 */
public class ProductContext extends BaseModel {
	
	private static final long serialVersionUID = -6071432986457262124L;
	
	/**
	 * @Fields url : 产品请求的URL地址
	 */ 
	private String url;
	
	/**
	 * @Fields requestId : 用户请求的服务ID，由入口产品所在环境分配
	 */ 
	private String requestId;
	
	/**
	 * @Fields environment : 操作环境
	 */ 
	private ProductEnvironment environment;
	
	/**
	 * @Fields time : 操作时间
	 */ 
	private Date time;
	
	/**
	 * @Fields referer : 来源url
	 */ 
	private String referer;
	
	public ProductContext() {
		environment = new ProductEnvironment();
		time = new Date();
		requestId = UUID.randomUUID().toString();
	}
	
	public ProductEnvironment getEnvironment() {
		return environment;
	}
	
	public void setEnvironment(ProductEnvironment environment) {
		this.environment = environment;
	}
	
	public Date getTime() {
		return time;
	}
	
	public void setTime(Date time) {
		this.time = time;
	}
	
	public String getRequestId() {
		return requestId;
	}
	
	public void setRequestId(String requestId) {
		this.requestId = requestId;
	}
	
	public String getReferer() {
		return referer;
	}
	
	public void setReferer(String referer) {
		this.referer = referer;
	}
	
	public String getUrl() {
		return url;
	}
	
	public void setUrl(String url) {
		this.url = url;
	}
}
